package amdocs.jet.pm;

import amdocs.jet.pm.currency.CurrencyListActivity;
import amdocs.jet.pm.safenote.SafeNoteActivity;
import android.app.TabActivity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.TabHost;

import com.amdocs.jet.pm.R;

public class PersonalManagerActivity extends TabActivity 
{
	public TabHost tabHost;
	public Resources resources;
	
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.main);

	    resources = getResources(); // Resource object to get Drawables
	    tabHost = getTabHost();  // The activity TabHost
	    TabHost.TabSpec spec;  // Resusable TabSpec for each tab
	    Intent intent;  // Reusable Intent for each tab
	    tabHost.setup();
	    
	    intent = new Intent().setClass(this, SafeNoteActivity.class);
	    spec = tabHost.newTabSpec(Constants.TAB_NAME_SAFE_NOTE).setIndicator(getString(R.string.string_safe_note), resources.getDrawable(R.drawable.ic_tab_safenote)).setContent(intent);
	    tabHost.addTab(spec);
	    

	    intent = new Intent().setClass(this, CurrencyListActivity.class);
	    spec = tabHost.newTabSpec(Constants.TAB_NAME_CURRENCIES).setIndicator(getString(R.string.string_currencies), resources.getDrawable(R.drawable.ic_tab_currency)).setContent(intent);
	    tabHost.addTab(spec);

	    intent = new Intent().setClass(this, AboutActivity.class);
	    spec = tabHost.newTabSpec(Constants.TAB_NAME_ABOUT).setIndicator(getString(R.string.string_about), resources.getDrawable(R.drawable.ic_menu_info_details)).setContent(intent);
	    tabHost.addTab(spec);

	    tabHost.setCurrentTab(0);
	}
}
